package cn.tedu.ivos2.user.controller;

import cn.tedu.ivos2.user.service.UserService;
import cn.tedu.ivos2.base.response.JsonResult;
import cn.tedu.ivos2.user.pojo.dto.UserLoginParam;
import cn.tedu.ivos2.user.pojo.vo.UserVO;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@Tag(name = "用户模块")
@Slf4j
@RestController
@RequestMapping("/v1/user")
public class UserController {
    @Autowired
    UserService userService;

    @PostMapping("/login")
    @ApiOperationSupport(order = 10)
    @Operation(summary = "用户登录")
    public JsonResult login(@Validated @RequestBody UserLoginParam userLoginparam) {
        log.debug("开始处理用户登录的请求，参数：{}", userLoginparam);
        UserVO userVO=userService.login(userLoginparam);
        return JsonResult.ok(userVO);
    }
    @Operation(summary = "用户查询")
    @ApiOperationSupport(order = 20)
    @GetMapping("/select")
    public JsonResult selectUser()
}
